package com.zhuimeng.minicat.service;

import java.util.HashMap;
import java.util.Map;

public class Mapper {

    private Map<String,Host> hostMap;

    public Mapper() {
        hostMap = new HashMap<>();
    }

    public Map<String, Host> getHostMap() {
        return hostMap;
    }

    public void setHostMap(Map<String, Host> hostMap) {
        this.hostMap = hostMap;
    }

    class Host{
        String appBase;
        Map<String,Context> contextMap;

        public Host() {
            contextMap = new HashMap<>();
        }

        public String getAppBase() {
            return appBase;
        }

        public void setAppBase(String appBase) {
            this.appBase = appBase;
        }

        public Map<String, Context> getContextMap() {
            return contextMap;
        }

        public void setContextMap(Map<String, Context> contextMap) {
            this.contextMap = contextMap;
        }
    }

    class Context{
        String contextName;
        Map<String,Wrapper> wrapperMap;

        public Context() {
            this.wrapperMap = new HashMap<>();
        }

        public String getContextName() {
            return contextName;
        }

        public void setContextName(String contextName) {
            this.contextName = contextName;
        }

        public Map<String, Wrapper> getWrapperMap() {
            return wrapperMap;
        }

        public void setWrapperMap(Map<String, Wrapper> wrapperMap) {
            this.wrapperMap = wrapperMap;
        }
    }

    class Wrapper{
        HttpServlet httpServlet;

        public HttpServlet getHttpServlet() {
            return httpServlet;
        }

        public void setHttpServlet(HttpServlet httpServlet) {
            this.httpServlet = httpServlet;
        }
    }
}

